<template>
  <view class="userInfo-container">
    <view class="info-item">
      <text class="lable">新密码:</text>
      <input type="text" placeholder="请输入新密码" v-model="params['密码']" />
    </view>
    <button @click="changePassword" class="btn">确认</button>
  </view>
</template>

<script>
export default {
  data() {
    return {
      params: {
        id: undefined,       
		密码:''
      },
      avatarUrl: "",
    };
  },

  onLoad() {
    // this.getUserInfo();
  },

  methods: {
    getUserInfo() {
      uni.showLoading({
        title: "加载中...",
      });
      this.$http2
        .post("ticketSystem/operator/info", { id: 0 })
        .then((res) => {
          console.log(res);
          if (res.code === 10000) {
            this.params.id = res.data.id;
          }
        });
    },   
    changePassword() {
      console.log("修改密码");
      this.$http2
        .post("ticketSystem/operator/update", this.params)
        .then((res) => {
          if (res.code === 10000) {
            console.log('修改完成')
          }
        });
    },
  },
};
</script>

<style lang="scss">
.userInfo-container {
  padding-top: 66rpx;
  .avatar {
    margin: 166rpx 215rpx;
  }
  .info-item {
    width: 100vw;
    display: flex;
    height: auto;
    margin: 20rpx 0 0 20rpx;
    color: #333;
    font-size: 28rpx;
    .lable {
      width: 180rpx;
    }
    .value {
      //   flex: 1;
      width: 460rpx;
    }
  }
  .btn {
    width: 536rpx;
    height: 72rpx;
    background: #1152FC;
    border-radius: 36px;
    color: #fff;
    line-height: 72rpx;
    margin-top: 100rpx;
    margin-bottom: 100rpx;
    // margin-bottom: 100rpx;
  }
}
</style>
